package com.heima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.mapper.TaskDetailsMapper;
import com.heima.pojo.entity.TaskDetails;
import com.heima.service.TaskDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * \* User: chy
 * \* Date: 2025/8/23  15:22
 * \* Description:
 * \
 */
@Service
public class TaskDetailsServiceImpl extends ServiceImpl<TaskDetailsMapper, TaskDetails> implements TaskDetailsService {

    @Autowired
    private TaskDetailsMapper taskDetailsMapper;

    /**
     * 获取任务详情
     * @param taskId
     * @return
     */
    @Override
    public List<TaskDetails> listDetails(Integer taskId) {

        LambdaQueryWrapper<TaskDetails> wrapper = new LambdaQueryWrapper<TaskDetails>()
                .eq(TaskDetails::getTaskId, taskId);
        return taskDetailsMapper.selectList(wrapper);
    }
}
